﻿<Application x:Class="Mubox.QuickLaunch.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="AppWindow.xaml">
    <Application.Resources>

        <Style x:Key="MuboxServerWindowStyle" TargetType="Window">
            <Setter Property="Background" Value="{DynamicResource MuboxBackgroundColorBrush}" />
        </Style>

        <Style x:Key="MuboxServerWindowBorderStyle" TargetType="Border">
            <Setter Property="BorderBrush" Value="{DynamicResource MuboxPrimaryColorBrush}" />
        </Style>

        <Style x:Key="MuboxServerWindowHeaderStyle" TargetType="Rectangle">
            <Setter Property="Fill" Value="{DynamicResource MuboxServerWindowHeaderBrush}" />
        </Style>

        <Style x:Key="MuboxServerLabelStyle" TargetType="Label">
            <Setter Property="Foreground" Value="{DynamicResource MuboxTextForegroundColorBrush}" />
        </Style>

        <Style x:Key="MuboxButtonStyle" TargetType="Button">
            <Setter Property="OverridesDefaultStyle" Value="True"/>
            <Setter Property="FontFamily" Value="Tahoma"/>
            <Setter Property="FontSize" Value="10"/>
            <Setter Property="Background" Value="{DynamicResource MuboxServerWindowButtonBrush}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border Name="border"
                            BorderThickness="1"
                            Padding="4,2"
                            BorderBrush="{DynamicResource MuboxPrimaryColorBrush}"
                            CornerRadius="3"
                            Background="{TemplateBinding Background}">
                            <Grid>
                                <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="content"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource MuboxHiliteColorBrush}" />
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource MuboxHiliteContrastColorBrush}" />
                                <Setter Property="Background">
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
                                            <GradientStop Color="{DynamicResource MuboxPrimaryColor}" Offset="0" />
                                            <GradientStop Color="{DynamicResource MuboxHiliteColor}" Offset="0.33" />
                                            <GradientStop Color="{DynamicResource MuboxPrimaryContrastColor}" Offset="0.77" />
                                            <GradientStop Color="{DynamicResource MuboxHiliteContrastColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter TargetName="content" Property="RenderTransform" >
                                    <Setter.Value>
                                        <TranslateTransform Y="1.0" />
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <Trigger Property="IsFocused" Value="True">
                                <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource MuboxHiliteColorBrush}" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Opacity" Value="0.44" />
                                <Setter Property="Foreground" Value="Gray" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Application.Resources>
</Application>